Some existing virtual machine (VM) data stores use large block sizes (e.g., 1 MB, etc.) to reduce metadata overhead and minimize contention among hosts working on the VM data store system. The data stores are used by computing devices which host VMs that may run different guest operating systems and associated virtual file systems. Many VMs use smaller block sizes (e.g., 16 KB, etc.) for addressing than block sizes used by their host datastore (e.g., 1 MB, etc.). Ensuring that memory space of the host is used efficiently is challenging due to the difference in block sizes for addressing.
A VM running on a host that uses a smaller block size may require memory space to be allocated and/or unmapped at a granularity of the smaller block size. Identifying portions of memory space at the smaller virtual block size for allocation and/or unmapping requires additional information beyond the block address of an associated larger host file block. For instance, a VM's guest operating system may allocate/unmap data in 16K blocks. However, the file system of the host running that VM may use 64-bit block addresses and a 1 MB host block size. Therefore, each 64-bit block address may include 8 bits of data unused by the block address that may each be used as an unmapping bit for an eighth of the 1 MB host block size, yielding an unmap granularity of 128 KB, which is the maximum unmap granularity possible based on the fixed size of the addresses and address blocks in the system.
FIGS. 1 to 8, the systems are illustrated as schematic drawings. The drawings may not be to scale.